<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div ng-app="myApp" ng-controller="myCtrl">
        <form novalidate>
            <br>
            <input type="text" ng-model="user.firstname">
            <input type="text" ng-model="user.lastname">
            <br>
            <br>
            <button ng-click="reset()">RESET</button>
        </form>
        <p>form = {{user}}</p>
        <p>master = {{master}}</p>
    </div>
    <script src="../js/angular165/angular.min.js"></script>
    <script>
        var app = angular.module('myApp', []);

        app.controller('myCtrl', function($scope) {
            $scope.master = {
                firstname: "kl",
                lastname: "ren"
            };
            $scope.reset = function() {
                $scope.user = angular.copy($scope.master);
            };
            $scope.reset();
        });
    </script>
</body>

</html>